home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / fr_may92.zip / FREQ.DOC < prev   
Text File  |  1992-05-04  |  5KB  |  119 lines

  1.                   Frequency logger for TeX font usage
  2.                          Answers this question:
  3.            "What fonts do I really need to run TeX preview?"
  4.  
  5. Version: 17 Jan 1992 [prev: 1 December 1991]
  6. Authors: Grant B. Gustafson and Greg Conner.
  7.          Other authors will be added here as contributions are made.
  8. email:   gustafso@math.utah.edu, conner@math.utah.edu (Internet addresses)
  9.  
  10. Copyright:
  11.          The source code is jointly owned by the authors. It may be used
  12.          for educational purposes without limitation. Modified versions
  13.          of the sources are considered private copies and should bear
  14.          the new authors names but not the present authors names.
  15.  
  16. Cost:
  17.          There is no charge, license fee or obligation. If someone makes
  18.          you pay for this, then it violates the intent of the authors.
  19.  
  20. Responsibility:
  21.          This computer program is used at your own risk. If you use it,
  22.          then you assume responsibility for anything that happens as a
  23.          result of the program operation, including but not limited to
  24.          programming errors, faulty operation, file system destruction.
  25.          The authors are not responsible.
  26.  
  27. Purpose:
  28. Log file use by date and time. The usage statistics are logged in one of
  29. two ways, depending upon the program:
  30.  
  31.         1. Log the file name to a file called \freq.dat. This file is
  32.         created as needed, and each file open causes an append of the
  33.         file \freq.dat. Source: fr.asm
  34.  
  35.         2. Log the file name, system date, system time to a directory
  36.         entry, located in a special subdirectory .\FREQ.USE, one level
  37.         below the current directory, for each attempted open of a file.
  38.         Source: freq.asm
  39.  
  40. The best use to date of these TSR utilities are as follows:
  41.  
  42.         a. Determine which fonts are used by a TeX previewer or DVI
  43.            printer driver.
  44.         b. Determine which fonts are used by a particular DVI file.
  45.         c. Determine which header files are actually used by a compiler.
  46.         d. Check file impact for a complex application like MS Windows.
  47.  
  48. THE FIRST METHOD: fr.asm.
  49.  
  50. The method in fr.asm suffers from simplicity and represents the easiest
  51. method from a user point of view. It takes no preparation to use and it
  52. gives the needed usage information in the least amount of time. To start
  53. the TSR, type the file name `fr.com' and let it do its work. While the
  54. TSR runs, certain commands like `DEL \FREQ.DAT' are allowed and
  55. expected. Also, it should be possible to yank the file \FREQ.DAT into
  56. your favorite text editor, while the TSR is running.
  57.  
  58. The disadvantage is that the file \freq.dat grows with each file open.
  59. Furthermore, many duplicate opens appear in the output file. In
  60. particular, bad opens will appear and also device opens to harmless
  61. files like NUL or CON.
  62.  
  63. THE SECOND METHOD: freq.asm
  64.  
  65. The method in freq.asm applies to solve questions of long-term use of
  66. certain files, especially font files, which are not all used on a single
  67. day. The basic idea is to turn on this TSR in autoexec.bat, then run the
  68. computer for a week to see how file usage proceeds.
  69.  
  70. The record keeping for the second method uses the DOS file structure to
  71. produce a special subdirectory of information. Repeated file use causes
  72. an update of the date and time, but no other frequency information is
  73. retained.
  74.  
  75. It is emphasized that the original file is untouched by the TSR. The
  76. action taken is to write a directory entry with file length 0, using the
  77. same file name, but in a subdirectory one level lower, with the special
  78. subdirectory name .\FREQ.USE.
  79.  
  80. It is also emphasized that the subdirectory FREQ.USE is updated by DOS,
  81. and it is therefore normal in every way. All normal DOS operations apply
  82. including DEL, DIR, REN.
  83.  
  84. To prevent the TSR from doing unnecessary work, a file SAMPLE.TXT will
  85. cause an update to ./FREQ.USE/SAMPLE.TXT only in case the subdirectory
  86. ./FREQ.USE already exists. The existence is controlled by the user: the
  87. subdirectory must be first created with the DOS command MKDIR.
  88.  
  89. If you run the TSR freq.com and nothing happens, then it is because you
  90. did not create a subdirectory FREQ.USE, or because no file open was
  91. attempted in the mother directory to FREQ.USE. In a normal application,
  92. there will be several subdirectories created, all with the name
  93. FREQ.USE, but in different mother directories.
  94.  
  95.  
  96. MODIFICATIONS:
  97.  
  98. It is possible to alter the sources to log more information than is
  99. presently kept. Once we talked about keeping a frequency count in the
  100. time word of the directory entry. It is easy to do and perhaps more
  101. useful than the last access time.
  102.  
  103. The log to file fr.asm can easily be modified to eliminate uninteresting
  104. file names like NUL and CON. Also, the success of an open can be tested,
  105. before logging. Finally, the system date and time can be logged besides
  106. the file name, if that information is important.
  107.  
  108. RELEASE TSR:
  109.  
  110. This TSR contains code to detect its own presence. However, it contains
  111. no code to release it from memory. Such code can be written following
  112. the ideas of Al Williams, "DOS 5: A Developers Guide", page 516 (M&T
  113. Books 1992).
  114.  
  115. If you find it necessary to release the TSR, then use the mark/release
  116. utilities available on Internet or the tablev/resdel utilities. A good
  117. source for these is wuarchive.wustl.edu, mirrors/msdos directory,
  118. anonymous ftp.
  119.